import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import electron from 'vite-plugin-electron'
import { resolve } from 'path'

export default defineConfig({
  plugins: [
    vue(),
    electron({
      entry: 'src/main/index.ts',
      vite: {
        build: {
          outDir: 'dist/main',
          rollupOptions: {
            external: ['electron', 'vue-router']
          }
        }
      }
    })
  ],
  resolve: {
    alias: {
      '@': resolve(__dirname, 'src')
    }
  },
  css: {
    postcss: './postcss.config.cjs'
  },
  build: {
    outDir: 'dist/renderer',
    emptyOutDir: true
  }
}) 